import request from '@/utils/request'
const bookController={
  getAllVolume: function (data){ //查询所有卷
    return request({
      url: '/volumeController/getAllVolume.jhtml',
      method: 'post',
      data
    })
  },
  getAllBookChannel: function(data){ //查询书籍频道
    return request({
      url:'/bookChannelController/getAllBookChannel.jhtml',
      method:'post'
    })
  },
  getClassifyByChannel: function(data){ //查询书籍分类
    return request({
      url:'/bookClassifyController/getClassifyByChannel.jhtml',
      method:'post',
      data
    })
  },
  uploadChapter: function (data){ //章节上传
    return request({
      url: '/chapterController/uploadChapter.jhtml',
      method: 'post',
      data
    })
  },
  insertRecord: function (data){ //新建书籍
    return request({
      url: '/bookController/insertRecord.jhtml',
      method: 'post',
      data
    })
  },
  updateNovelCover: function (data){ //上传封面
    return request({
      url: '/bookController/updateNovelCover.jhtml',
      method: 'post',
      data
    })
  },
  checkBookName: function (data){ //检查书籍名称
    return request({
      url: '/bookController/checkBookName.jhtml',
      method: 'post',
      data
    })
  },
  selectByAuthorId: function (){ //获取作者书籍
    return request({
      url: '/bookController/selectByAuthorId.jhtml',
      method: 'post'
    })
  },
  getChapterInfoByBookId: function (data){ //读者获取书籍信息（章节列表）
    return request({
      url: '/chapterController/getChapterInfoByBookId.jhtml',
      method: 'post',
      data
    })
  },
  bookInfoById: function (data){ //作者获取书籍信息（章节列表）
    return request({
      url: '/bookController/bookInfoById.jhtml',
      method: 'post',
      data
    })
  },
  updateDescribeByBookId: function (data){ //修改书籍简介
    return request({
      url: '/bookController/updateDescribeByBookId.jhtml',
      method: 'post',
      data
    })
  },
  getChapterInfoById: function (data){ //获取章节详情
    return request({
      url: '/chapterController/getChapterInfoById.jhtml',
      method: 'post',
      data
    })
  },
  updateChapterContent: function (data){ //修改章节内容
    return request({
      url: '/chapterController/updateChapterContent.jhtml',
      method: 'post',
      data
    })
  }                  
}
export default bookController
